// pages/add/addTag/addTag.js
import {recommendMember} from '../../../utils/api'
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[]
  },
  recommendMember(){
    let projectId = '1ec2e58d748d432e90ea9190259ed2ce'
    recommendMember(projectId).then((res)=>{
      let list = res.data
      list.map(v=>{
        // console.log(v.rate);
        v.rate = Math.floor(v.rate)
      })
      console.log(list);

      this.setData({
        list
      })
    })
  },
  toAddTeamMate(){
    wx.showToast({
      title: 'Sucess',
      icon: 'success',
      duration:800
    }).then(()=>{
      setTimeout(()=>{
        wx.switchTab({
          url: '../add/add',
        })
      },800)
      
    })
    
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.recommendMember()

  },

})